var vm = new Vue({
    el: '#vm',
    data: {
        items:[
            { name: '张三', age: 18 },
            { name: '李四', age: 20 },
            { name: '王五', age: 25 }
        ],

        userProfile: {
            name: 'Anika'
        },

        counter: 0

    },
    methods: {
        say: function(msg,event){
            if(event) event.preventDefault();   // 阻止元素发生默认的行为
            alert(msg);
        },
        doThis: function(){
            return this.counter ++;
        },
        submit: function(){
            alert('OK')
        },
        
    }
});
